package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLDateTime;
import HLLib.base.HLLong;
import HLLib.base.HLString;

public class HLClassDateTime extends HLLibClass {
    public HLClassDateTime(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLDateTime();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HLDateTime) self).SetTime((HLLong)args.GetObject(0));
            break;
        }
        case 1: {
            ((HLDateTime) self).SetNow();
            break;
        }
        case 2: {
            ((HLDateTime) self).SetDefaultTimeZone();
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).TotalMillisecond();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).TotalMillisecond());
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).TotalSecond();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).TotalSecond());
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Date();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).Date());
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Day();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Day());
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Hour();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Hour());
            }
            break;
        }
        case 8: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Millisecond();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Millisecond());
            }
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Minute();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Minute());
            }
            break;
        }
        case 10: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Month();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Month());
            }
            break;
        }
        case 11: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Second();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Second());
            }
            break;
        }
        case 12: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Year();
            } else {
                resultOwnerObject.SetInt(resultIndex, ((HLDateTime) self).Year());
            }
            break;
        }
        case 13: {
            ((HLDateTime) self).AddDays(args.GetInt(0));
            break;
        }
        case 14: {
            ((HLDateTime) self).AddHours(args.GetInt(0));
            break;
        }
        case 15: {
            ((HLDateTime) self).AddMilliseconds(args.GetInt(0));
            break;
        }
        case 16: {
            ((HLDateTime) self).AddMinutes(args.GetInt(0));
            break;
        }
        case 17: {
            ((HLDateTime) self).AddMonths(args.GetInt(0));
            break;
        }
        case 18: {
            ((HLDateTime) self).AddSeconds(args.GetInt(0));
            break;
        }
        case 19: {
            ((HLDateTime) self).AddYears(args.GetInt(0));
            break;
        }
        case 20: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).CompareTo((HLDateTime)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).CompareTo((HLDateTime)args.GetObject(0)));
            }
            break;
        }
        case 21: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Equals((HLDateTime)args.GetObject(0));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HLDateTime) self).Equals((HLDateTime)args.GetObject(0)));
            }
            break;
        }
        case 22: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Subtract1((HLDateTime)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).Subtract1((HLDateTime)args.GetObject(0)));
            }
            break;
        }
        case 23: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Subtract((HLLong)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).Subtract((HLLong)args.GetObject(0)));
            }
            break;
        }
        case 24: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).ToDateTimeString((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).ToDateTimeString((HLString)args.GetObject(0)));
            }
            break;
        }
        case 25: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).ToDateString();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).ToDateString());
            }
            break;
        }
        case 26: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).ToTimeString();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).ToTimeString());
            }
            break;
        }
        case 27: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).ToISODateTimeString();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).ToISODateTimeString());
            }
            break;
        }
        case 28: {
            if (resultOwnerObject == null) {
                ((HLDateTime) self).Clone();
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HLDateTime) self).Clone());
            }
            break;
        }
        case 29: {
            ((HLDateTime) self).SetYear(args.GetInt(0));
            break;
        }
        case 30: {
            ((HLDateTime) self).SetMonth(args.GetInt(0));
            break;
        }
        case 31: {
            ((HLDateTime) self).SetDay(args.GetInt(0));
            break;
        }
        case 32: {
            ((HLDateTime) self).SetHour(args.GetInt(0));
            break;
        }
        case 33: {
            ((HLDateTime) self).SetMinute(args.GetInt(0));
            break;
        }
        case 34: {
            ((HLDateTime) self).SetMillisecond(args.GetInt(0));
            break;
        }
        case 35: {
            ((HLDateTime) self).SetSecond(args.GetInt(0));
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HLDateTime.GetTimeZone();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLDateTime.GetTimeZone());
            }
            break;
        }
        case 1: {
            if (resultOwnerObject == null) {
                HLDateTime.CurrentMillisecond();
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDateTime.CurrentMillisecond());
            }
            break;
        }
        case 2: {
            if (resultOwnerObject == null) {
                HLDateTime.CurrentSecond();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLDateTime.CurrentSecond());
            }
            break;
        }
        case 3: {
            if (resultOwnerObject == null) {
                HLDateTime.Compare((HLDateTime)args.GetObject(0), (HLDateTime)args.GetObject(1));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDateTime.Compare((HLDateTime)args.GetObject(0), (HLDateTime)args.GetObject(1)));
            }
            break;
        }
        case 4: {
            if (resultOwnerObject == null) {
                HLDateTime.Equals((HLDateTime)args.GetObject(0), (HLDateTime)args.GetObject(1));
            } else {
                resultOwnerObject.SetBoolean(resultIndex, HLDateTime.Equals((HLDateTime)args.GetObject(0), (HLDateTime)args.GetObject(1)));
            }
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                HLDateTime.Parse((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDateTime.Parse((HLString)args.GetObject(0)));
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                HLDateTime.ParseLongString((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLDateTime.ParseLongString((HLString)args.GetObject(0)));
            }
            break;
        }
        }
    }
}
